package io.gitee.twoke.generator.engine.impl.persistence.entity;

import io.gitee.twoke.generator.engine.impl.generate.DataTableColumn;
import lombok.ToString;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@ToString
public class  DataTableEntityImpl extends AbstractEntity implements DataTableEntity {
    private String id;
    private String tableComment;
    private String tableName;
    private String className;
    private String author;
    private String remark;
    private String packageName;
    private String moduleName;
    private String functionName;
    private String businessName;
    private String subTableName;
    private String subTableFkName;
    private String generateType;
    private String generatePath;
    private String templateGroupIds;
    private List<DataTableColumn> columns = new ArrayList<>();
    @Override
    public Object getPersistentState() {
        Map<String, Object> data = new HashMap<String, Object>();
        data.put("id", id);
        data.put("tableComment", tableComment);
        data.put("tableName", tableName);
        data.put("className", className);
        data.put("author", author);
        data.put("remark", remark);
        data.put("packageName", packageName);
        data.put("moduleName", moduleName);
        data.put("businessName", businessName);
        data.put("functionName", functionName);
        data.put("subTableName", subTableName);
        data.put("subTableFkName", subTableFkName);
        data.put("generateType", generateType);
        data.put("generatePath", generatePath);
        data.put("templateGroupIds", templateGroupIds);
        return data;
    }

    @Override
    public void setColumns(List<DataTableColumn> columns) {
        this.columns = columns;
    }

    @Override
    public List<DataTableColumn> getColumns() {
        return columns;
    }

    @Override
    public String getBusinessName() {
        return businessName;
    }

    @Override
    public void setBusinessName(String businessName) {
        this.businessName = businessName;
    }

    @Override
    public void setId(String id) {
		 this.id=id;
	}

    @Override
    public String getId() {
		 return this.id;
	}

    @Override
    public void setTableComment(String tableComment) {
		 this.tableComment=tableComment;
	}

    @Override
    public String getTableComment() {
		 return this.tableComment;
	}

    @Override
    public void setTableName(String tableName) {
		 this.tableName=tableName;
	}

    @Override
    public String getTableName() {
		 return this.tableName;
	}

    @Override
    public void setClassName(String className) {
		 this.className=className;
	}

    @Override
    public String getClassName() {
		 return this.className;
	}

    @Override
    public void setAuthor(String author) {
		 this.author=author;
	}

    @Override
    public String getAuthor() {
		 return this.author;
	}

    @Override
    public void setRemark(String remark) {
		 this.remark=remark;
	}

    @Override
    public String getRemark() {
		 return this.remark;
	}

    @Override
    public void setPackageName(String packageName) {
		 this.packageName=packageName;
	}

    @Override
    public String getPackageName() {
		 return this.packageName;
	}

    @Override
    public void setModuleName(String moduleName) {
		 this.moduleName=moduleName;
	}

    @Override
    public String getModuleName() {
		 return this.moduleName;
	}

    @Override
    public void setFunctionName(String functionName) {
		 this.functionName=functionName;
	}

    @Override
    public String getFunctionName() {
		 return this.functionName;
	}

    @Override
    public void setSubTableName(String subTableName) {
		 this.subTableName=subTableName;
	}

    @Override
    public String getSubTableName() {
		 return this.subTableName;
	}

    @Override
    public void setSubTableFkName(String subTableFkName) {
		 this.subTableFkName=subTableFkName;
	}

    @Override
    public String getSubTableFkName() {
		 return this.subTableFkName;
	}

    @Override
    public void setGenerateType(String generateType) {
		 this.generateType=generateType;
	}

    @Override
    public String getGenerateType() {
		 return this.generateType;
	}

    @Override
    public void setGeneratePath(String generatePath) {
		 this.generatePath=generatePath;
	}

    @Override
    public String getGeneratePath() {
		 return this.generatePath;
	}

    @Override
    public void setTemplateGroupIds(String templateGroupIds) {
		 this.templateGroupIds=templateGroupIds;
	}

    @Override
    public String getTemplateGroupIds() {
		 return this.templateGroupIds;
	}

}
